#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Author  :   JingV
@Version :   1.0
@Contact :   None
@License :   None
@Desc    :   None
'''


class Solution(object):
    def generate(self, rowIndex):
        result = [1]
        if rowIndex == 0:
            return result
        result = [1, 1]
        if rowIndex == 1:
            return result
        count = 1
        while count < rowIndex:
            temp = [1]
            for i in range(1, len(result)):
                temp.append(result[i-1] + result[i])
            temp.append(1)
            result = temp
            count += 1
        return result


def main():
    solution = Solution()
    tests = [3]
    for rowIndex in tests:
        print(solution.generate(rowIndex))


if __name__ == "__main__":
    main()

